﻿<UserControl x:Class="MefWallpaperAddin.GeoWallpaperUserControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
	Loaded="UserControl_Loaded"
			 xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" d:DesignWidth="303" d:DesignHeight="392.965"
			 >

    <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
    		<Grid x:Name="grid" VerticalAlignment="Stretch" Width="Auto" Height="Auto">
    			<Grid.RowDefinitions>
                    <RowDefinition Height="*" />
                    <RowDefinition Height="*" />
                    <RowDefinition Height="*" />
    			</Grid.RowDefinitions>
    			<Grid.ColumnDefinitions>
    				<ColumnDefinition Width="*"/>
    			</Grid.ColumnDefinitions>
            <StackPanel Grid.Row="0" x:Name="PhotoDetails" DataContext="{Binding LastPhoto}">
                <Label Content="Last photo title:" FontWeight="bold"/>
                <TextBlock x:Name="tbTitle" Margin="10,0,0,0" Text="{Binding Path=Title}" />
                <Label Content="Last photographer:" FontWeight="bold" />
                <TextBlock x:Name="tbPhotographer" Margin="10,0,0,0" Text="{Binding Path=OwnerName}" />
                <Button Content="Visit Photo Page" Width="100" Margin="10" Click="Button_Click" />
            </StackPanel>
            <StackPanel Grid.Row="1">
                    <Label Content="Flickr search tags (comma-separated):" FontWeight="bold"/>
                    <StackPanel Orientation="Horizontal" >
                        <TextBox x:Name="tbTags" Width="200" Margin="10,0,10,0" Text="{Binding Path=FlickrTags, Mode=TwoWay}" />
                        <Button x:Name="btnUpdateTags" Click="btnUpdateTags_Click" HorizontalAlignment="Right" Content="Update Search"/>
                    </StackPanel>
                    <Label Content="Update interval (seconds):" FontWeight="bold"/>
                <StackPanel Orientation="Horizontal">
                    <TextBox x:Name="tbInterval" Width="60" Margin="10,0,10,0" Text="{Binding Path=AutoUpdateInterval, Mode=TwoWay}" HorizontalAlignment="Left" />
                    <Button x:Name="btnUpdateInterval" Content="Change Interval" HorizontalAlignment="Left" Click="btnUpdateInterval_Click" />
                </StackPanel>
                <CheckBox Height="16" Name="cbAutoUpdate" Margin="10,0,10,0"  IsChecked="{Binding Path=AutoUpdateEnabled, Mode=TwoWay}" Click="cbAutoUpdate_Click">Automatically refresh?</CheckBox>
                <StackPanel Orientation="Horizontal">
                    <Button x:Name="btnRefresh" Margin="10"  HorizontalAlignment="Center" Click="btnRefresh_Click" Content="Next Image"/>
                    <Button x:Name="btnBeginAuth" Margin="10"  HorizontalAlignment="Center" Content="Authorize Flickr Account" Click="btnBeginAuth_Click" />
                    <Button x:Name="btnCompleteAuth" Margin="10"  HorizontalAlignment="Center" Content="Complete Authorization" Click="btnCompleteAuth_Click" />
                </StackPanel>
            </StackPanel>
            </Grid>
    </ScrollViewer>
</UserControl>